package com.inspur.service.impl;

import java.util.List;



import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.inspur.mapper.userMapper;
import com.inspur.pojo.user;
import com.inspur.service.userService;
@Service("userService")
public class UserServiceImpl implements userService{
	@Autowired
    private userMapper userMapper;
	
	/**
	 * 用户登录查询
	 */
	public user getUser(user user) {
		// TODO Auto-generated method stub
		return userMapper.getUser(user);
	}

	/**
	 * 用户的默认查询
	 */
	public List<user> getUserList(Map<String,String> map) {
		// TODO Auto-generated method stub
		return userMapper.getUserList(map);
	}
	
	@Override
	public void deleteUser(int[] ids) {
		userMapper.deleteUser(ids);
	}
	
	@Override
	public void changeTF(int[] ids) {
		userMapper.changeTF(ids);
	}
	
	@Override
	public void userClose(int[] ids) {
		userMapper.userClose(ids);
	}
	
	@Override
	public void resetPass(int[] ids) {
		userMapper.resetPass(ids);
	}
	@Override
	public void addUser(user user) {
		userMapper.addUser(user);
	}

	@Override
	public List<user> getUserByUserName(String username) {
		// TODO Auto-generated method stub
		return userMapper.getUserByUserName(username);
	}
	
	@Override
	public user getUserById(int id) {
		// TODO Auto-generated method stub
		return userMapper.getUserById(id);
	}

	@Override
	public void updateUser(user user) {
		userMapper.updateUser(user);
		
	}
	
	/**
	 * 批量导入客户经理同时导入用户信息
	 */
	public void importUser(List<user> userList) {
		userMapper.importUser(userList);
	}

	@Override
	public int getSeqValue() {
		return userMapper.getSeqValue();
	}
	/**
	 * 根据ID查询
	
	 public user getuserById(int id){
		 
	 return userMapper.getuserById(id);
	 }
	 
	 根据name查询:
	 
	 public user getuserByname(String username){
		 
		 return userMapper.getuserByname(username);
	 }
	 */
}
